'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH FSTYP_GET_ATTR 3FSTYP "Nov 26, 2017"
.SH NAME
fstyp_get_attr \- get file system attributes
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lfstyp\fR \fB -lnvpair \fR [ \fIlibrary\fR\&.\|.\|. ]
#include <libnvpair.h>
#include <libfstyp.h>

\fBint\fR \fBfstyp_get_attr\fR(\fBfstyp_handle_t\fR \fIhandle\fR, \fBnvlist_t **\fR\fIattrp\fR);
.fi

.SH PARAMETERS
.ne 2
.na
\fB\fIhandle\fR\fR
.ad
.RS 10n
Opaque handle returned by \fBfstyp_ident\fR(3FSTYP).
.RE

.sp
.ne 2
.na
\fB\fIattrp\fR\fR
.ad
.RS 10n
Address to which the name-pair list is returned.
.RE

.SH DESCRIPTION
.LP
The \fBfstyp_get_attr()\fR function returns a name-value pair list of various
attributes for an identified file system. This function can be called only
after a successful call to \fBfstyp_ident()\fR.
.sp
.LP
Each file system has its own set of attributes. The following attributes are
generic and are returned when appropriate for a particular file system type:
.sp
.ne 2
.na
\fB\fBgen_clean (DATA_TYPE_BOOLEAN_VALUE)\fR\fR
.ad
.sp .6
.RS 4n
Attribute for which \fBtrue\fR and \fBfalse\fR values are allowed. A
\fBfalse\fR value is returned if the file system is damaged or if the file
system is not cleanly unmounted. In the latter case, \fBfsck\fR(8) is required
before the file system can be mounted.
.RE

.sp
.ne 2
.na
\fB\fBgen_guid (DATA_TYPE_STRING)\fR\fR
.ad
.sp .6
.RS 4n
Globally unique string identifier used to establish the identity of the file
system.
.RE

.sp
.ne 2
.na
\fB\fBgen_version (DATA_TYPE_STRING)\fR\fR
.ad
.sp .6
.RS 4n
String that specifies the file system version.
.RE

.sp
.ne 2
.na
\fB\fBgen_volume_label (DATA_TYPE_STRING)\fR\fR
.ad
.sp .6
.RS 4n
Human-readable volume label string used to describe and/or identify the file
system.
.sp
Attribute names associated with specific file systems should not start with
\fBgen_\fR.
.RE

.SH RETURN VALUES
.LP
The \fBfstyp_get_attr()\fR function returns \fB0\fR on success and an error
value on failure. See \fBfstyp_strerror\fR(3FSTYP).
.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.LP
.BR fstyp_ident (3FSTYP),
.BR fstyp_mod_init (3FSTYP),
.BR fstyp_strerror (3FSTYP),
.BR libfstyp (3LIB),
.BR attributes (7)
